home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 (Alt) / Vol 132.iso / games / nameless.swf / scripts / frame_5 / DoAction.as
Encoding:
Text File  |  2011-06-09  |  1.4 KB  |  77 lines

  1. stop();
  2. _root.level = 2;
  3. _quality = "LOW";
  4. _root.stopAllSounds();
  5. _root.music.stop();
  6. music = new Sound();
  7. music.attachSound("level2");
  8. music.start();
  9. timesPlayed = 0;
  10. music.onSoundComplete = function()
  11. {
  12.    if(timesPlayed == 0)
  13.    {
  14.       _root.stopAllSounds();
  15.       _root.music.stop();
  16.       _root.level3trans.play();
  17.    }
  18.    else
  19.    {
  20.       timesPlayed += 1;
  21.       music.start();
  22.    }
  23. };
  24. gameGo = false;
  25. diff = 3000;
  26. Fnum = 0;
  27. _root.health = 100;
  28. _root.magic = 100;
  29. _root.createEmptyMovieClip("diffMove",1);
  30. diffMove.onEnterFrame = function()
  31. {
  32.    numnum = random(2);
  33.    if(numnum == 1)
  34.    {
  35.       _root.diff -= 1;
  36.    }
  37.    if(_root.diff <= 0 && _root.gotoLevel3._currentframe == 1)
  38.    {
  39.       _root.gotoLevel3.play();
  40.    }
  41. };
  42. pauseMC.removeMovieClip();
  43. _root.createEmptyMovieClip("pauseMC",0);
  44. pview._visible = false;
  45. pauseMC.onEnterFrame = function()
  46. {
  47.    if(Key.isDown(80))
  48.    {
  49.       if(pausePress == false)
  50.       {
  51.          if(_root.pauseMode == false)
  52.          {
  53.             _root.pauseMode = true;
  54.          }
  55.          else
  56.          {
  57.             _root.pauseMode = false;
  58.          }
  59.          pausePress = true;
  60.       }
  61.    }
  62.    else
  63.    {
  64.       pausePress = false;
  65.    }
  66.    if(_root.pauseMode == true)
  67.    {
  68.       pview._visible = true;
  69.       _root.music.setVolume(40);
  70.    }
  71.    else
  72.    {
  73.       pview._visible = false;
  74.       _root.music.setVolume(100);
  75.    }
  76. };
  77.